package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ByCouponUserMapper;
import com.ruoyi.system.domain.ByCouponUser;
import com.ruoyi.system.service.IByCouponUserService;

/**
 * 会员优惠券Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-20
 */
@Service
public class ByCouponUserServiceImpl implements IByCouponUserService 
{
    @Autowired
    private ByCouponUserMapper byCouponUserMapper;

    /**
     * 查询会员优惠券
     * 
     * @param id 会员优惠券主键
     * @return 会员优惠券
     */
    @Override
    public ByCouponUser selectByCouponUserById(Long id)
    {
        return byCouponUserMapper.selectByCouponUserById(id);
    }

    /**
     * 查询会员优惠券列表
     * 
     * @param byCouponUser 会员优惠券
     * @return 会员优惠券
     */
    @Override
    public List<ByCouponUser> selectByCouponUserList(ByCouponUser byCouponUser)
    {
        return byCouponUserMapper.selectByCouponUserList(byCouponUser);
    }

    /**
     * 新增会员优惠券
     * 
     * @param byCouponUser 会员优惠券
     * @return 结果
     */
    @Override
    public int insertByCouponUser(ByCouponUser byCouponUser)
    {
        return byCouponUserMapper.insertByCouponUser(byCouponUser);
    }

    /**
     * 修改会员优惠券
     * 
     * @param byCouponUser 会员优惠券
     * @return 结果
     */
    @Override
    public int updateByCouponUser(ByCouponUser byCouponUser)
    {
        return byCouponUserMapper.updateByCouponUser(byCouponUser);
    }

    /**
     * 批量删除会员优惠券
     * 
     * @param ids 需要删除的会员优惠券主键
     * @return 结果
     */
    @Override
    public int deleteByCouponUserByIds(Long[] ids)
    {
        return byCouponUserMapper.deleteByCouponUserByIds(ids);
    }

    /**
     * 删除会员优惠券信息
     * 
     * @param id 会员优惠券主键
     * @return 结果
     */
    @Override
    public int deleteByCouponUserById(Long id)
    {
        return byCouponUserMapper.deleteByCouponUserById(id);
    }
}
